<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
    <head>
        <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
        <meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1">
            <title>Shampoo - My Lifestyle. My Reservation.</title>
            <link href='http://fonts.googleapis.com/css?family=Open+Sans:100,400,300,300italic,400italic,600,600italic,700,700italic,800,800italic&amp;subset=latin,latin-ext' rel='stylesheet' type='text/css'/>


            <?php Yii::app()->clientScript->registerCssFile($this->assetDir . 'css/jquery-ui.css'); ?>
            <?php Yii::app()->clientScript->registerCssFile($this->assetDir . 'css/bootstrap.min.css'); ?>
            <?php Yii::app()->clientScript->registerCssFile($this->assetDir . 'css/bootstrap-responsive.min.css'); ?>
            <?php Yii::app()->clientScript->registerCssFile($this->assetDir . 'css/bootstrap-select.min.css'); ?>
            <?php Yii::app()->clientScript->registerCssFile($this->assetDir . 'css/default.css'); ?>
            <?php Yii::app()->clientScript->registerCssFile($this->assetDir . 'css/camera.css'); ?>
            <?php Yii::app()->clientScript->registerCssFile($this->assetDir . 'css/custom.css'); ?>
            <?php Yii::app()->clientScript->registerCssFile($this->assetDir . 'css/component.css'); ?>
            <?php Yii::app()->clientScript->registerCssFile($this->assetDir . 'css/style.css'); ?>
            <?php Yii::app()->clientScript->registerCssFile($this->assetDir . 'css/noJS.css'); ?>
            <?php Yii::app()->clientScript->registerCssFile($this->assetDir . 'css/responsive.css'); ?>
            <?php Yii::app()->clientScript->registerCssFile($this->assetDir . 'css/chosen.css'); ?>
            <?php Yii::app()->clientScript->registerCssFile($this->assetDir . 'css/select2.css'); ?>

            <?php Yii::app()->clientScript->registerCoreScript('jquery'); ?>

            <?php Yii::app()->clientScript->registerScriptFile($this->assetDir . 'js/jquery-ui1.10.3.js', CClientScript::POS_HEAD); ?>
            <?php Yii::app()->clientScript->registerScriptFile($this->assetDir . "js/bootstrap.min.js"); ?>
            <?php Yii::app()->clientScript->registerScriptFile($this->assetDir . "js/jquery.swing.js"); ?>
            <?php Yii::app()->clientScript->registerScriptFile($this->assetDir . "js/jquery.easing.1.3.js"); ?>
            <?php Yii::app()->clientScript->registerScriptFile($this->assetDir . "js/bootstrap-select.min.js"); ?>
            <?php Yii::app()->clientScript->registerScriptFile($this->assetDir . 'js/prettify.js'); ?>
            <?php Yii::app()->clientScript->registerScriptFile($this->assetDir . 'js/browser-search.js'); ?>
            <?php Yii::app()->clientScript->registerScriptFile($this->assetDir . 'js/jquery.chosen.min.js'); ?>
            <?php Yii::app()->clientScript->registerScriptFile($this->assetDir . 'js/modernizr.custom.js'); ?>
            <?php Yii::app()->clientScript->registerScriptFile($this->assetDir . 'js/select2.min.js'); ?>

    </head>

    <body class="browser-page">
        <div class="page-wrap">
            <?php // echo $this->renderPartial('//layouts/_main_header') ?>
            <?php echo $content ?>
<!--            <div id="loading">
                <div id="loading_content">
                    <img src="<?php echo $this->assetDir ?>img/loading.gif"/>
                    Loading ...
                </div>
            </div>-->
        </div>
        <?php // echo $this->renderPartial('//layouts/_footer') ?>

        <script type="text/javascript" src="http://maps.google.com/maps/api/js?sensor=true"></script>
        <?php Yii::app()->clientScript->registerScriptFile($this->assetDir . 'js/gmaps.js', CClientScript::POS_END); ?>
        <script>
            //load ajax
//            $("#loading").bind("ajaxStart", function() {
//                $(this).show();
//            }).bind("ajaxComplete", function() {
//                $(this).hide();
//            });

           
            function favourite(el, sid)
            {
<?php if (!Yii::app()->user->isGuest): ?>
                    $.post('<?php echo $this->createUrl('favourite/check'); ?>', {
                        sid: sid
                    }, function(data) {
                        if (data.status == 1) {//add
                            el.find('i').removeClass('icon-heart-white').addClass('icon-heart-pink');
                        }
                        else {//remove
                            el.find('i').removeClass('icon-heart-pink').addClass('icon-heart-white');
                        }
                    }, 'json');
<?php else: ?>
                    alert('Please login or signup to add to My Favourites');
<?php endif; ?>
            }
        </script>

        <?php //Yii::app()->clientScript->registerScriptFile($this->assetDir . 'js/masonry.pkgd.min.js'); ?>
        <?php //Yii::app()->clientScript->registerScriptFile($this->assetDir . 'js/imagesloaded.js'); ?>
        <?php //Yii::app()->clientScript->registerScriptFile($this->assetDir . 'js/classie.js'); ?>
        <?php //Yii::app()->clientScript->registerScriptFile($this->assetDir . 'js/AnimOnScroll.js'); ?>


        <script>
            $('[data-rel="chosen"],[rel="chosen"]').chosen();
        </script>
        <script>
            function vote(el, sid, point)
            {
<?php if (!Yii::app()->user->isGuest): ?>
                    $.ajax({
                        type: "GET",
                        url: "<?php echo $this->createUrl('search/AjaxVote') ?>",
                        data: {
                            sid: sid,
                            point: point
                        }
                    }).done(function(msg) {
                        el.parent().html(msg);
                    });
<?php else: ?>
                    $('.login-tab').addClass('open');
                    $('.signup-tab').removeClass('open');
<?php endif; ?>
            }
        </script>
    </body>
</html>